TAGs: Diophantine equation solver